package io.finer.erp.jeecg.bas.service.impl;

import io.finer.erp.jeecg.bas.dto.BasCustomerAddressDTO;
import io.finer.erp.jeecg.bas.dto.BasCustomerDTO;
import io.finer.erp.jeecg.bas.entity.BasCustomer;
import io.finer.erp.jeecg.bas.mapper.BasCustomerMapper;
import io.finer.erp.jeecg.bas.service.IBasCustomerService;

import java.util.List;

import org.jeecg.common.api.vo.Result;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 客户
 * @Author: jeecg-boot
 * @Date:   2020-04-01
 * @Version: V1.0
 */
@Service
public class BasCustomerServiceImpl extends ServiceImpl<BasCustomerMapper, BasCustomer> implements IBasCustomerService {

	@Override
	public Result<?> getCustomers() {
		List<BasCustomer> list = list();
		return Result.ok(list);
	}

	@Override
	public IPage<BasCustomerDTO> getCustomerByRegionId(Page<BasCustomerDTO> page, String regionId, String name) {
		// TODO Auto-generated method stub
		return baseMapper.getCustomerByRegionId(page, regionId, name);
	}

}
